package com.huang.annotation_reflection;

public class reflection04 {
    public static void main(String[] args) {
        A a = new A();
        System.out.println(a.m);

        /*
        1.加获到内存，会产生一个类对应Class对象
        2.链接，链接结束后m=0
        3.初始化
        <clinit>(){
                System.out.println("静态代码块初始化");
                m = 300;
                m = 100;
            }
            m=100
         */

    }
}

class A {
    static {
        System.out.println("静态代码块初始化");
        m = 300;
    }

    static int m = 100;

    public A() {
        System.out.println("无参构造初始化");
    }
}